const path = require('path')
const dao = require('./Dao')
const database = require('../modules/databse')

// 获取参数列表数据
module.exports.list = function (cat_id, sel, cb) {
    const db = database.getDataBase()
    let sql = `SELECT * FROM sp_attribute WHERE cat_id = ? AND attr_sel = ? AND delete_time is NULL`
    db.driver.execQuery(sql, [cat_id, sel], (err, attrs) => {
        if (err) return cb('查询执行出错')
        cb(null, attrs)
    })
}